// this include
#include <gingko.h>
#include <async_pool.h>
#include <gp_log.h>
#include <gp_socket.h>
#include <gp_memory.h>

gko_pool* gko_pool::_instance = NULL; // static field init
pthread_mutex_t gko::gko_pool::instance_lock = PTHREAD_MUTEX_INITIALIZER;
// TODO:

int gko_pool::conn_client_list_init()
{
    // what is option?
    g_client_list = new conn_client* [option->connlimit];
    memset(g_client_list, 0, option->connlimit * sizeof(struct conn_client*));

    g_total_clients = 0;
    g_total_connect = 0;

    GKOLOG(NOTICE, "Client pool initialized as %d", option->connlimit);

    return option->connlimit;
}

